<div class="admin-panel-wrap">
    <div class="icon32 icon-options-general">
        <br/>
    </div>
    <h2>Services | Rsync</h2>
    <form action="" method="post">
        <table class="form-table">
            <tbody>
                <tr valign="top">
                    <th scope="row">
                        <label>Max Connections:</label>
                    </th>
		    <td>
			<input class='regular-text' type = "text" name="maxConnections" id = "maxConnections"  value="<{$maxConnections}>">
                    </td>
                </tr>
                <tr valign="top">
                    <th scope="row">
                        <label>Log File:</label>
                    </th>
		    <td>
                        <input class ='regular-text' type = 'text' name = "logFile" id = "logFile" value = "<{$logFile}>" >
                    </td>
                </tr>
                <tr valign="top">
		    <th scope="row">
			<label>Pid File:</label>
                    </th>
		    <td>
                        <input class = 'regular-text' type = 'text' name = 'pidFile' id = 'pidFile' value = "<{$pidFile}>">
                    </td>
                </tr>
                <tr valign="top">
                    <th scope="row">
                        <label>Syslog Facility:</label>
                    </th>
                    <td width='78%' class='vtable'>
                        <select class='formselect' name='syslog' id='syslog' >
                            <{foreach item=option from=$syslogOption}>
                                <{if $option == $syslog }>
                                    <option value="<{$option}>" selected><{$option}></option>
                                <{elseif $option == "daemon" and $syslogEmptyFlag }>
                                    <option value="<{$option}>" selected><{$option}></option>
                                <{else}>
                                    <option value="<{$option}>" ><{$option}></option>
                                <{/if}>
                            <{/foreach}>
                        </select>
                </tr>
            </tbody>
    	</table>
        <p class="submit">
            <input class="button-primary" type="submit" value="Save and Restart" name="Submit"/>
        </p>
    </form>
</div>
<script type="text/javascript">
    selElement = 'logFile';
    selPath = document.getElementById('logFile').getAttribute("value")
    var parts = new Array();
    parts = selPath.split("/");
    selNewPath = ''
    for (var i = 1; i < parts.length-1; i++) {
        selNewPath = selNewPath + '/' + parts[i]
    }
    $('logFile').addEvent('click',function(){
        window.open("<{$webUrl}>/file/browser/dir/?dir="+selNewPath, 'strWindowName', 'strWindowFeatures');
    })
</script>